// 获取思维导图容器
const mindmap = document.getElementById('mindmap');

// 创建根节点
const rootNode = document.createElement('div');
rootNode.classList.add('node');
rootNode.textContent = '思维导图';
mindmap.appendChild(rootNode);

// 创建子节点
const childNode1 = document.createElement('div');
childNode1.classList.add('node');
childNode1.textContent = '子节点1';
mindmap.appendChild(childNode1);

const childNode2 = document.createElement('div');
childNode2.classList.add('node');
childNode2.textContent = '子节点2';
mindmap.appendChild(childNode2);

// 创建连接线
const line1 = document.createElement('div');
line1.classList.add('line');
line1.style.left = '50%';
line1.style.top = '200px';
line1.style.height = '100px';
mindmap.appendChild(line1);

const line2 = document.createElement('div');
line2.classList.add('line');
line2.style.left = '25%';
line2.style.top = '200px';
line2.style.height = '100px';
mindmap.appendChild(line2);